#coding=utf-8
import sys
sys.setrecursionlimit(10000)

from stconfig import *
from sqlalchemy import *
from sqlalchemy.orm import *

import stockdb.tables as tables 
from stockdb.mappers import stockdb_mapping
from stockdb.domains import *

#db_uri = 'sqlite:////home/jay/stock.sqlite'
db_uri = 'mysql://root:123456@localhost/stock'
engine = create_engine(db_uri)#, echo=True)
tables.metadata.create_all(engine)

stockdb_mapping()

sess = Session
sess.configure(bind=engine)
